﻿namespace KeRui.URLRewriter.Config
{
    using System;
    using System.Configuration;
    using System.Reflection;

    public class UrlsCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new UrlConfigElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((UrlConfigElement) element).VirtualUrl;
        }

        public UrlConfigElement this[int index]
        {
            get
            {
                return (UrlConfigElement) base.BaseGet(index);
            }
        }
    }
}

